<template>
  <view style="padding: 10px 20px">
    <view style="text-align: center">
      <view style="font-size: 36upx">独角兽企业投资机构</view>
    </view>
    <view style="margin-bottom: 10upx">简介</view>

    <u-line></u-line>
    <view
      style="
        margin-top: 20upx;
        font-size: 26upx;
        color: #666;
        margin-bottom: 20upx;
      "
    >
      报告简介，文本内容，报告简介，文本内容报告简介，文本内容大会简介，文本内容报告简介，文本内容大会简介，文本内容大会简介，文本内容大会简介，文本内容，大会简介，文本内容，大会简介，文本内容大会简介，文本内容大会简介，文本内容大会简介
    </view>
    <view style="text-align: center">
      <u-button style="font-size: 30upx" @click="handleEnter"
        >独角兽企业投资机构入驻报名</u-button
      >
    </view>

    <uTabs :baseList="tabBasicList" />
    <view style="margin-bottom: 20upx" >
      <view style="margin-top: 20upx">
        <mainList
          :baseList="topCompanyBasicList"
          url="/pages/invest/details"
          category="product_tzjg"
          type="invest"
        />
      </view>
    </view>
  </view>
</template>

<script>
import mainList from "@/components/mainList/index.vue";
import uTabs from "@/components/uTabs/index.vue";
export default {
  components: {
    mainList,
    uTabs,
  },
  data() {
    return {
      array: ["中国", "美国", "巴西", "日本"],
      index: 0,
      tabBasicList: [
        {
          name: "合作投资机构",
        },
        {
          name: "风险投资公司",
        },
        {
          name: "证券基金机构",
        },
      ],
      checkboxValue1: [],
      // 基本案列数据
      checkboxList1: [
        {
          name: "独角兽",
          disabled: false,
        },
        {
          name: "隐形独角兽",
          disabled: false,
        },
        {
          name: "其他",
          disabled: false,
        },
      ],
      topCompanyBasicList: [
        {
          id: 0,
          title: "2024年度全球独角兽企业500强大会",
          desc: "企业简介企业简介企业简介",
          tag: "企业标签",
          slot: "",
        },
        {
          id: 1,
          title: "2024年度全球独角兽企业500强大会",
          desc: "企业简介企业简介企业简介",
          tag: "企业标签",
          slot: "",
        },
        {
          id: 2,
          title: "2024年度全球独角兽企业500强大会",
          desc: "企业简介企业简介企业简介",
          tag: "企业标签",
          slot: "",
        },
      ],
    };
  },
  onLoad() {},
  onShow() {
    this.getType();
    this.getList();
  },
  methods: {
    async getType() {
      const res = await this.$api.getTzjgType({});
      this.tabBasicList = (res || [])?.map((item) => {
        return {
          ...item,
          name: item.title || item.typename,
        };
      });
    },
    async getList() {
      const res = await this.$api.getTzjg({
        page: 1,
        limit: 10,
        uid: uni.getStorageSync("userInfo").uid || 0,
      });
      console.log(res);
      this.topCompanyBasicList = res?.map((item) => {
        return {
          ...item,
          img_url: item.icon_url,
          name: item.fullname,
          desc_text: "投资企业数：" + item.touzi_gongsi_num,
          real_name: "投资事件数：" + item.touzi_event_num,
          city:`${item.nation_name} - ${item.city_name}`,
          msg: item.gs_zhuce_dizhi,
        };
      });
      console.log("列表数据");
      console.log(this.topCompanyBasicList);
    },
    handleEnter() {
      uni.navigateTo({
        url: "/pages/company/enter",
      });
    },
  },
};
</script>

<style></style>